<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>鑫鑫社区</title>
    <link rel="stylesheet" href="../static/css/bootstrap.min.css" th:href="@{/css/bootstrap.min.css}">
    <link rel="stylesheet" href="../static/css/bootstrap-theme.css" th:href="@{/css/bootstrap-theme.css}">
    <link rel="stylesheet" href="../static/css/community.css" th:href="@{/css/community.css}">
    <script type="text/javascript" src="../static/js/jquery2-1-4.min.js" th:src="@{/js/jquery2-1-4.min.js}"></script>
    <script type="text/javascript" src="../static/js/bootstrap.min.js" th:src="@{/js/bootstrap.min.js}"></script>
    <script type="text/javascript">
        window.onload=function () {
            var closeable = localStorage.getItem("closeable");
            if(closeable=="true"){
                localStorage.removeItem("closeable");
                window.close();
            }

        }
    </script>
</head>
<body>
    <div th:insert="~{navigation :: nav}"></div>
    <div class="container-fluid main">
        <div class="row">
            <div class="col-lg-9 col-md-12 col-sm-12 col-xs-12">
                <h2><span class="glyphicon glyphicon-list" aria-hidden="true"></span>发现</h2>
                <hr>
                <div class="media" th:each="question : ${pagination.data}">
                    <div class="media-left">
                        <a href="#">
                            <img class="media-object img-circle" th:src="${question.user.avatarUrl}">
                        </a>
                    </div>
                    <div class="media-body">
                        <h4 class="media-heading">
                            <a th:href="@{'/question/'+${question.id}}"  th:text="${question.title}"></a>
                        </h4>
                        <!--<span th:text="${question.description}">点击进入 康康 </span><br>-->
                        <span class="text_desc">
                            <span th:text="${question.commentCount}">0</span>个回复 • <span th:text="${question.viewCount}">0</span>次浏览 • <span th:text="${#dates.format(question.gmtCreate,'yyyy-MM-dd HH:mm')}"></span>
                        </span>
                    </div>
                </div>
                <nav aria-label="Page navigation">
                    <ul class="pagination" th:if="${search}!=null">
                        <li th:if="${pagination.showFirstPage}">
                            <a th:href="@{page=1/(search=${search})}" aria-label="FirstPage">
                                <span aria-hidden="true">&lt;&lt;</span>
                            </a>
                        </li>
                        <li th:if="${pagination.showPrevious}">
                            <a th:href="@{/(page=${pagination.page - 1},search=${search})}"  aria-label="Previous">
                                <span aria-hidden="true">&lt;</span>
                            </a>
                        </li>
                        <li th:each="page : ${pagination.pages}" th:class="${pagination.page==page}?'active':''">
                            <a th:href="@{/(page=${page},search=${search})}"
                               th:text="${page}"
                            >1</a>
                        <li th:if="${pagination.showNext}">
                            <a th:href="@{/(page=${pagination.page+1},search=${search})}" aria-label="Next">
                                <span aria-hidden="true">&gt;</span>
                            </a>
                        </li>
                        <li th:if="${pagination.showEndPage}">
                            <a th:href="@{/(page=${pagination.totalPage},search=${search})}" aria-label="EndPage">
                                <span aria-hidden="true">&gt;&gt;</span>
                            </a>
                        </li>
                    </ul>
                    <ul class="pagination" th:if="${search}==null">
                        <li th:if="${pagination.showFirstPage}">
                            <a th:href="@{/page=1}" aria-label="FirstPage">
                                <span aria-hidden="true">&lt;&lt;</span>
                            </a>
                        </li>
                        <li th:if="${pagination.showPrevious}">
                            <a th:href="@{/(page=${pagination.page - 1})}"  aria-label="Previous">
                                <span aria-hidden="true">&lt;</span>
                            </a>
                        </li>
                        <li th:each="page : ${pagination.pages}" th:class="${pagination.page==page}?'active':''">
                            <a th:href="@{/(page=${page})}"
                               th:text="${page}"
                            >1</a>
                        <li th:if="${pagination.showNext}">
                            <a th:href="@{/(page=${pagination.page+1})}" aria-label="Next">
                                <span aria-hidden="true">&gt;</span>
                            </a>
                        </li>
                        <li th:if="${pagination.showEndPage}">
                            <a th:href="@{/(page=${pagination.totalPage})}" aria-label="EndPage">
                                <span aria-hidden="true">&gt;&gt;</span>
                            </a>
                        </li>
                    </ul>
                </nav>
            </div>
            <div class="col-lg-3	col-md-12 col-sm-12 col-xs-12">
                <h3>热门话题</h3>
            </div>
        </div>
    </div>
</body>
</html>